﻿using AutoMapper.Internal.Mappers;
using EMS.system.Entityies.MasterData.MaterialManagementModel;
using EMS.system.IEntityAppService.MasterData.MaterialManagementService.MaterialManagementDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

namespace EMS.system.IEntityAppService.MasterData.MaterialManagementService
{
    public interface IMaterialManagementAppService:IApplicationService
    {
        /// <summary>
        /// 调用递归获取物料类型数据
        /// </summary>
        /// <param name="materialTypeName"></param>
        /// <returns></returns>
        Task<List<MaterialTypeTreeDto>> GetMaterialType();

        /// <summary>
        /// 物料新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> MaterialAdd(MaterialManagementAddDto model);


        /// <summary>
        /// 获取所有物料数据
        /// </summary>
        /// <returns></returns>
        Task<List<MaterialManagement>> GetMaterialAll();

        /// <summary>
        /// 物料删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<int> MaterialDelete(int id);

        /// <summary>
        /// 获取单个物料
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<MaterialManagement> GetSingMaterial(int id);

        /// <summary>
        /// 物料编辑
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> MaterialUpdate(MaterialManagementUpdDto model);
    }
}
